- Author:
- Soroush Safaei <ssaf006@aucklanduni.ac.nz>
- Date:
- 2017-06-18 14:38:07+12:00
- Desc:
- Merge remote-tracking branch 'origin/master'
- Permanent Source URI:
- https://models.fieldml.org/workspace/43b/rawfile/192cf4b46edfe5a1e400271ee88fada82aa384c2/BG Tutorial Fluid Systems/1-SingleTube.cellml
<?xml version='1.0'?>
<model name="SingleTube" xmlns="http://www.cellml.org/cellml/1.1#" xmlns:cellml="http://www.cellml.org/cellml/1.1#" xmlns:xlink="http://www.w3.org/1999/xlink">
<import xlink:href="Units.cellml">
<units name="mm" units_ref="mm"/>
<units name="mm3" units_ref="mm3"/>
<units name="mm3_per_s" units_ref="mm3_per_s"/>
<units name="mm6_per_J" units_ref="mm6_per_J"/>
<units name="J_per_s" units_ref="J_per_s"/>
<units name="gJ_per_m3" units_ref="gJ_per_m3"/>
<units name="gJ_s_per_m3" units_ref="gJ_s_per_m3"/>
<units name="eJ_s_per_m6" units_ref="eJ_s_per_m6"/>
<units name="pJ_s2_per_m5" units_ref="pJ_s2_per_m5"/>
<units name="eJ_s2_per_m6" units_ref="eJ_s2_per_m6"/>
</import>
<component name="main">
<variable name="t" units="second"/>
<variable initial_value="1.0" name="period" units="second"/>
<!-- State variables-->
<variable initial_value="0" name="q_in" units="mm3"/>
<variable initial_value="0" name="q_out" units="mm3"/>
<variable initial_value="0" name="q1" units="mm3"/>
<variable name="v_in" units="mm3_per_s"/>
<variable initial_value="0" name="v1" units="mm3_per_s"/>
<variable initial_value="0" name="u_out" units="gJ_per_m3"/>
<variable name="u1" units="gJ_per_m3"/>
<!-- Constitutive parameters-->
<variable initial_value="0.004e-9" name="mu" units="gJ_s_per_m3"/>
<variable initial_value="1050e-15" name="rho" units="pJ_s2_per_m5"/>
<variable initial_value="20" name="l" units="mm"/>
<variable initial_value="2.3" name="r" units="mm"/>
<variable initial_value="0.5" name="h" units="mm"/>
<variable initial_value="400000e-9" name="E" units="gJ_per_m3"/>
<variable name="C1" units="mm6_per_J"/>
<variable name="R1" units="eJ_s_per_m6"/>
<variable name="I1" units="eJ_s2_per_m6"/>
<variable initial_value="20.93" name="a1" units="dimensionless"/>
<variable initial_value="0.199" name="b1" units="dimensionless"/>
<variable initial_value="0.08563" name="c1" units="dimensionless"/>
<!-- Inlet flow-->
<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply>
<eq/>
<ci>v_in</ci>
<apply>
<times/>
<ci>a1</ci>
<apply>
<exp/>
<apply>
<minus/>
<apply>
<power/>
<apply>
<divide/>
<apply>
<minus/>
<apply>
<minus/>
<ci>t</ci>
<apply>
<times/>
<ci>period</ci>
<apply>
<floor/>
<apply>
<divide/>
<ci>t</ci>
<ci>period</ci>
</apply>
</apply>
</apply>
</apply>
<ci>b1</ci>
</apply>
<ci>c1</ci>
</apply>
<cn cellml:units="dimensionless">2</cn>
</apply>
</apply>
</apply>
</apply>
</apply>
<!-- Conservation laws-->
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>q_in</ci>
</apply>
<ci>v_in</ci>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>q_out</ci>
</apply>
<ci>v1</ci>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>q1</ci>
</apply>
<apply>
<minus/>
<ci>v_in</ci>
<ci>v1</ci>
</apply>
</apply>
<apply>
<eq/>
<apply>
<diff/>
<bvar>
<ci>t</ci>
</bvar>
<ci>v1</ci>
</apply>
<apply>
<divide/>
<apply>
<minus/>
<apply>
<minus/>
<ci>u1</ci>
<ci>u_out</ci>
</apply>
<apply>
<times/>
<ci>R1</ci>
<ci>v1</ci>
</apply>
</apply>
<ci>I1</ci>
</apply>
</apply>
<!-- Constitutive relations-->
<apply>
<eq/>
<ci>C1</ci>
<apply>
<divide/>
<apply>
<times/>
<cn cellml:units="dimensionless">3</cn>
<pi/>
<apply>
<power/>
<ci>r</ci>
<cn cellml:units="dimensionless">3</cn>
</apply>
<ci>l</ci>
</apply>
<apply>
<times/>
<cn cellml:units="dimensionless">2</cn>
<ci>E</ci>
<ci>h</ci>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>R1</ci>
<apply>
<divide/>
<apply>
<times/>
<cn cellml:units="dimensionless">8</cn>
<ci>mu</ci>
<ci>l</ci>
</apply>
<apply>
<times/>
<pi/>
<apply>
<power/>
<ci>r</ci>
<cn cellml:units="dimensionless">4</cn>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>I1</ci>
<apply>
<divide/>
<apply>
<times/>
<ci>rho</ci>
<ci>l</ci>
</apply>
<apply>
<times/>
<pi/>
<apply>
<power/>
<ci>r</ci>
<cn cellml:units="dimensionless">2</cn>
</apply>
</apply>
</apply>
</apply>
<apply>
<eq/>
<ci>u1</ci>
<apply>
<divide/>
<ci>q1</ci>
<ci>C1</ci>
</apply>
</apply>
</math>
</component>
</model>